﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Tagging;

namespace FlexHighlighter
{
    public class FlexClassificationTag : ITag
    {
        public FlexTokenType FlexTokenType { get; private set; }
        public FlexClassificationTag(FlexTokenType type)
        {
            FlexTokenType = type;
        }
    }

    internal sealed  class FlexTokenTagger :  ITagger<FlexClassificationTag>
    {
        private ITextBuffer _buffer;
        private readonly IDictionary<string, FlexTokenType> _types;
        public FlexTokenTagger(ITextBuffer buffer)
        {
            Buffer = buffer;
            _types = new Dictionary<string, FlexTokenType>();
            _types["%%"] = FlexTokenType.Begin;
            _types["%"] = FlexTokenType.Token;
        }

        public ITextBuffer Buffer
        {
            get { return _buffer; }
            set { _buffer = value; }
        }

        public IEnumerable<ITagSpan<FlexClassificationTag>> GetTags(NormalizedSnapshotSpanCollection spans)
        {
           
            return null;
        }

        public event EventHandler<SnapshotSpanEventArgs> TagsChanged
        {
            add { }
            remove { }
        }
    }
}
